#include "../include/Job.h"
#include "../include/Employee.h"
#include "../include/Effect.h"
#include "../include/Gaussian.h"
#include "../include/CvtColor.h"
#include "../include/Resize.h"
#include <istream>
#include <vector>
#include <iostream>
#include <string>
#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/DOM/AutoPtr.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Node.h>
#include <Poco/DOM/ElementsByTagNameList.h>
#include <Poco/DOM/NamedNodeMap.h>
#include <Poco/DOM/DocumentFragment.h>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"

using namespace cv;
using namespace std;

// The class is responsible for parsing a job from its XML representation, and build a job instance accordingly.
class PocoXMLParser
{
private:
	Poco::XML::AutoPtr<Poco::XML::Document> fDom;
	vector<Effect*>* effectsList;

public:
	// Class constructor.
	PocoXMLParser(void);

	// Class destructor. Deletes the effects list it had created.
	~PocoXMLParser(void);

	// Takes the given string and removes all whitespaces from it.
	void parseXmlString(std::string& xml);

	// Takes the whitespaces-less string, retrieves the job data from it and builds a job instance accordingly.
	Job* getParsedXML();

	// Converts the given enum to int.
	int enumConverter(const Poco::XML::XMLString en);
};
